package com.kczd.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.ArrayList;

/**
 * zhangy
 * Created by Administrator on 2017/3/3 0003.
 */

public class FragmentAdapter extends FragmentPagerAdapter {
    private ArrayList<Fragment> list;

    public FragmentAdapter(FragmentManager fm) {
        super(fm);
    }



    public FragmentAdapter(FragmentManager fm,
                           ArrayList<Fragment> list) {
        super(fm);
        this.list = list;
    }



    @Override
    public Fragment getItem(int arg0) {
        // TODO Auto-generated method stub
        return list.get(arg0);
    }

    @Override
    public int getCount() {
        // TODO Auto-generated method stub
        return list.size();
    }

}
